<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
  <title>RoughJS Polygon</title>
</head>

<body>
  <svg width="800" height="800"></svg>

  <script type="module">
    import rough from '../../bin/rough.js';
    const svg = document.querySelector('svg');
    const rc = rough.svg(svg);

    svg.appendChild(rc.polygon([
      [10, 10],
      [200, 10],
      [100, 100],
      [100, 50],
      [300, 100],
      [60, 200]
    ], { fillStyle: 'solid', stroke: 'black', strokeWidth: 2, fill: 'red', hachureAngle: 90 }));


  </script>
</body>

</html>